Conversation
Introduce kit::time with steady_now_ns() for high-resolution monotonic timestamps on Linux (clock_gettime), macOS (mach_absolute_time), and Windows (QueryPerformanceCounter). Made-with: Cursor
Add CMAKE_EXPORT_COMPILE_COMMANDS to macOS and Linux presets so clangd can provide accurate diagnostics and navigation. Made-with: Cursor
Provides get_process_id(), get_process_name(), get_host_name() across macOS, Linux, and Windows to centralise system info queries in kit. Made-with: Cursor
Header-only bswap16/32/64 wrapping compiler intrinsics for GCC, Clang, and MSVC to support little-endian wire format encoding. Made-with: Cursor
get_system_time() returns 100ns intervals since 1601-01-01 UTC using GetSystemTimePreciseAsFileTime on Windows and clock_gettime(CLOCK_REALTIME) on POSIX. get_utc_offset_seconds() returns the local UTC offset. Made-with: Cursor
- Windows: native WaitForMultipleObjects - Linux: POSIX unnamed semaphore + pthread mutex (original design) - macOS: GCD dispatch_semaphore (no unnamed POSIX semaphores there), clock-safe relative timeouts mirroring the Linux algorithm
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Port the P7 PMEvent (CMEvent/IMEvent) wait-any primitive into kit as c_event, adapted to project conventions. Manages a set of auto-reset, manual-reset and counting events and waits until any one is signaled, returning its index.
Replaces the va_list Init() with a type-safe array-based init().
Wired into CMake per platform, exposed via kit.h, covered by gtest.